import { defineStore } from "pinia";
import { DICT_MAP } from "@/const";

function createDefaultState() {
  return Object.fromEntries(
    Object.entries(DICT_MAP).map(([_, value]) => [value, null])
  );
}

export const useDictStore = defineStore("dict", () => {
  // setup
  const dictListMap = ref(createDefaultState());

  return {
    dictListMap,
  };
});
